export default {
    namespaced: true,
    actions: {},
    mutations: {
        SUBTRACT(state, value) {
            state.sum -= value
        },
        ADD_PERSON(state, value) {
            console.log('mutations中的ADD_PERSON被调用了')
            state.personList.unshift(value)
        }
    },
    state: {
        personList: [
            {id: '001', name: 'JOJO'}
        ]
    },
    getters: {
        FirstName(state) {
            return state.personList[0].name
        }
    },
}